import {createRouter, createWebHistory} from "vue-router";

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/home',
            component: () => import('../views/Home/index.vue'),
            name: 'home',
            children: [
                {
                    path: 'music',
                    component: () => import('../views/Home/Music/index.vue'),
                    name: 'music',
                    children: [
                        {
                            path: 'musicItem/:name',
                            component: () => import('../views/Home/Music/musicItem.vue'),
                            name: 'musicItem',
                        }
                    ]
                },
                {
                    path: 'news',
                    component: () => import('../views/Home/News/index.vue'),
                    name: 'news',
                    children: [
                        {
                            path: 'newsItem',
                            component: () => import('../views/Home/News/newsItem.vue'),
                            name: 'newsItem',
                        }
                    ]
                }
            ]
        },
        {
            path: '/login',
            component: () => import('../views/Login/index.vue'),
            name: 'login',
        }
    ]
})

export default router